<template>
  <div>
    <el-form class="input-form"
             label-position="right"
             label-width="120px"
             ref="editForm"
             :rules="propRules"
             :disabled="propReadonly"
             :model="form"
    >
      <el-row :gutter="20">
        <el-col :span="12">
          <el-form-item label="品名" prop="matrName" :disabled="true">
            <el-input v-model="form.matrName" :disabled="true"/>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="品规" prop="matrSpec" >
            <el-input v-model="form.matrSpec" :disabled="true"/>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :span="12">
          <el-form-item label="注册证号" prop="certificateNo">
            <el-input v-model="form.certificateNo" :disabled="true"/>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="包装单位" prop="packageUnit">
            <el-input v-model="form.packageUnit" :disabled="true"/>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :span="12">
          <el-form-item label="包装数量" prop="packageQty">
            <el-input v-model="form.packageQty" :disabled="true"/>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="单品单位" prop="skuUnit">
            <el-input v-model="form.skuUnit" :disabled="true"/>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">

      </el-row>
      <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="单品数量" prop="skuQty">
              <el-input v-model="form.skuQty" :disabled="true"/>
            </el-form-item>
          </el-col>
          <el-col :span="12">
          <el-form-item label="供应商名称" prop="supplierName">
            <el-input v-model="form.supplierName" :disabled="true"/>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :span="24">
          <el-form-item label="备注" prop="remark">
            <el-input v-model="form.remark" />
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>

<script>

export default {
  data() {
    return {
      form: {},
      viewData: {}
    }
  },
  methods: {},
  created() {
    this.$emit('event-register', {
      validate: (callback) => {
        this.$refs.editForm.validate(callback)
      },
      beforeSave: () => {
        this.$emit('data-callback', this.form)
        return true
      },
      afterMove: (formData, initData) => {
        this.form = global.utils.jsonClone(formData)

        // 设置switch 元素默认值
      },
      afterSave: () => {
      },
      beforeDelete: () => {
        return true
      },
      afterDelete: () => {
      },
      beforeFlow: (flowButtonKey) => {
        return true
      },
      afterFlow: (flowButtonKey) => {
      },
      beforeClose: () => {
        return true
      }
    })
  },
  props: {
    propParent: Object,
    propInitData: Object,
    propPrimaryKey: String,
    propDictionaries: Object,
    propCurrentRow: Object,
    propViewFormData: Object,
    propReadonly: Boolean,
    propStatus: String,
    propRules: Object
  },
  components: {},
  computed: {}
}
</script>

<style lang="scss" scoped>
.container {
  width: 100%;
  height: 100%;
}
</style>
